package test12;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test201521123067 {
	public static void main(String[] args) {
		 String str = "ABC";
		 boolean isOctNum = isOctNumers(str);
		 if(isOctNum){
			 System.out.println("true");
		 }
		 else{
			 System.out.println("false");
		 }
		 }
		 private static boolean isOctNumers(String str) {
			 Pattern pattern = Pattern.compile("[0-9]*");
	            Matcher isNum = pattern.matcher(str);
	            if( !isNum.matches() )
	            {
	                  return false;
	            }
	            return true;
		 }
}
